//-----------------------------------------------------------------------
// <copyright file="Commands.cs" company="Robert MacLean">
//     This file is released under the LGPL. For more information see 
//     http://gallery2.codeplex.com.
//     Originally created by Robert MacLean http://www.sadev.co.za
// </copyright>
//-----------------------------------------------------------------------

namespace SADev.Gallery2.Protocol
{
    /// <summary>
    /// Commands supported by G2
    /// </summary>
    internal enum Commands
    {
        /// <summary>
        /// The login command adds the proper user object to the session (if the username and password are correct).
        /// </summary>
        /// <remarks>
        /// The login command is not strictly necessary: if it is not used, the server will assume anonymous access and the protocol will be able to access data that is accessible by anybody. In this mode, it is unlikely the new albums can be created and photos uploaded.
        /// </remarks>
        Login = 0,

        /// <summary>
        /// The no-op command doesn't do anything. It can be used by clients to verify that the module is operational. 
        /// </summary>
        NoOp = 1,

        /// <summary>
        /// The fetch-albums command asks the server to return a list of all albums (visible with the client's logged in user permissions). In most cases, it's better to use fetch-albums-prune because it's much faster...
        /// </summary>
        FetchAlbums = 2,

        /// <summary>
        /// The fetch-album-images command asks the server to return information about all the images (and optionally sub-albums) that are direct children of an album. 
        /// </summary>
        FetchImages = 3,

        /// <summary>
        /// The fetch-albums-prune command asks the server to return a list of all albums that the user can either write to, or that are visible to the user and contain a sub-album that is writable (including sub-albums several times removed). 
        /// </summary>
        FetchAlbumsPrune = 4,

        /// <summary>
        /// The album-properties command asks the server for information about an album. 
        /// </summary>
        AlbumProperties = 5,

        /// <summary>
        /// The add-item command asks the server to add a photo to a specified album. It's usually necessary to have previously sent a login request. 
        /// </summary>
        /// <remarks>This command differs from <see cref="AddItemUpload"/> in that it is used for just adding items from a specified url.</remarks>        
        AddItemUrl = 6,

        /// <summary>
        /// The new-album command asks the server to add a new album to the gallery installation. 
        /// </summary>
        NewAlbum = 7,

        /// <summary>
        /// The move-album command asks the server to move an album to a new location within the Gallery. 
        /// </summary>
        MoveAlbum = 8,

        /// <summary>
        /// The increment-view-count command informs the Gallery that the user has viewed a given item. It should be called by slideshow applications, for example. Applications that run unattended (screen savers) should probably not call it...
        /// </summary>
        IncrementViewCount = 9,

        /// <summary>
        /// The image-properties command returns information about one image, in similar fashion as the fetch-album-images command... 
        /// </summary>
        ImageProperties = 10,

        /// <summary>
        /// The add-item command asks the server to add a photo to a specified album. It's usually necessary to have previously sent a login request. 
        /// </summary>
        /// /// <remarks>This command differs from <see cref="AddItemUrl"/> in that it is used for uploading files to the gallery.</remarks>
        AddItemUpload = 11
    }
}
